const install = (Vue) => {
	let apis = {
		/*
		 *  登录相关接口
		 */
		// 注册配送员
		registerDeliveryInfo(data = {}){
			return Vue.prototype.$u.post('/deliveryInfo/registerDeliveryInfo', data)
		},
		// 配送员登录
		loginDeliveryInfo(data = {}){
			return Vue.prototype.$u.post('/deliveryInfo/loginDeliveryInfo', data)
		},
		/*
		 *  首页相关
		 */
		// 获取广告
		getBanner(data = {}){
			return Vue.prototype.$u.get('/getBanner', data)
		},

		// 获取校园
		getComSchool(data = {}){
			return Vue.prototype.$u.post('/comSchool/getComSchool', data)
		},
		// 添加配送员审核
		addDeliveryExamine(data = {}){
			return Vue.prototype.$u.post('/deliveryExamine/addDeliveryExamine', data)
		},
		//获取订单
		getOrderTakeaway(data = {}){
			return Vue.prototype.$u.post('/orderTakeaway/getOrderTakeaway', data)
		},
		//获取外卖订单（配送员）
		getOrderTakeawayHallToDelivery(data = {}){
			return Vue.prototype.$u.post('/orderTakeaway/getOrderTakeawayHallToDelivery', data)
		},
		//配送员抢单
		robOrderTakeawayToDelivery(data = {}){
			return Vue.prototype.$u.post('/orderTakeaway/robOrderTakeawayToDelivery', data)
		},
		//配送员取餐
		takeOrderTakeawayToDelivery(data = {}){
			return Vue.prototype.$u.post('/orderTakeaway/takeOrderTakeawayToDelivery', data)
		},

		//配送员确认完成
		okOrderTakeawayToDelivery(data = {}){
			return Vue.prototype.$u.post('/orderTakeaway/okOrderTakeawayToDelivery ', data)
		},
		//获取外卖订单
		getOrderTakeaway(data = {}){
			return Vue.prototype.$u.post('/orderTakeaway/getOrderTakeaway', data)
		},
		//配送员审核记录
		getDeliveryExamine(data = {}){
			return Vue.prototype.$u.post('/deliveryExamine/getDeliveryExamine', data)
		},
		//获取今日抢单
		getDayRobOrder(data = {}){
			return Vue.prototype.$u.post('/reportFormsDelivery/getDayRobOrder', data)
		},
		//获取累计抢单
		getAllRobOrder(data = {}){
			return Vue.prototype.$u.post('/reportFormsDelivery/getAllRobOrder', data)
		},
		//获取我的余额
		getDayRobOrderBalance(data = {}){
			return Vue.prototype.$u.post('/reportFormsDelivery/getDayRobOrderBalance', data)
		},
		//获取二维码
		transferOrderTakeawayCode(data = {}){
			return Vue.prototype.$u.post('/orderTakeaway/transferOrderTakeawayCode', data)
		},
	}
	Vue.prototype.$u.api = {...apis};
}

export default {
	install
}